package com.baizhou.honglv.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 实体类对应数据表
 * form 对应接受前端数据
 * dto 对应返回前端数据
 * </p>
 *
 * @author wanghaipeng
 * @since 2021-07-14
 */
@Data
  @EqualsAndHashCode(callSuper = false)
    @ApiModel(value="User对象", description="")
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "用户id")
  @TableId(value = "id", type = IdType.ASSIGN_UUID)
  private String id;

  @ApiModelProperty(value = "用户名")
  private String name;

  @ApiModelProperty(value = "密码")
  private String password;

  @ApiModelProperty(value = "电话号")
  private String phoneNumber;

  @ApiModelProperty(value = "乐观锁")
  @Version
  private Integer version;

  @TableLogic
  private Integer deleted;

  @ApiModelProperty(value = "创建时间")
  @TableField(fill = FieldFill.INSERT)
  private Date createTime;

  @ApiModelProperty(value = "更新时间")
  @TableField(fill = FieldFill.INSERT_UPDATE)
  private Date updateTime;

  @ApiModelProperty(value = "生日")
  @TableField(fill = FieldFill.INSERT)
  private Date birthday;

  @ApiModelProperty(value = "职业")
  private String profession;


  @ApiModelProperty(value = "QQ")
  private String qq;

  @ApiModelProperty(value = "微信")
  private String weChat;

  @ApiModelProperty(value = "微博")
  private String weiBo;

  public User(String id, String phoneNumber, Date birthday) {
    this.id = id;
    this.phoneNumber = phoneNumber;
    this.birthday = birthday;
  }
}


